﻿using HPIT_Library_Modal;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;

namespace HPIT_Library.Ashx
{
    /// <summary>
    /// Escarst 的摘要说明
    /// </summary>
    public class Escarst : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
           // DataTable dt=  HPIT_Library_BLL.categoryManger.SelectName();
            eScarts escarst = new eScarts();

            //escarst.CategoryName = new string[] { };
            escarst.CategoryName =new string[] { "畅销文学类", "儿童文学类", "现当代文学", "名著类" };
            escarst.Count = new int[] {5,3,0,4 };
            JavaScriptSerializer js = new JavaScriptSerializer();
            context.Response.Write(js.Serialize(escarst));
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}